<div>
<script src="{%base_url%}resources/codepress/codepress.js" type="text/javascript"></script>
<h1>Изменение кода ссылок</h1>
<form action="{%link[{%class%},{%method%}]%}" id="update_form" method="post">
<table>
<tr>
   <td colspan="2">
      <textarea name="content" id="text-content" class="hide"></textarea>
      <textarea id="myCpWindow" class="codepress php autocomplete-off linenumbers-off i" cols="150" rows="40">{%content%}</textarea>
      <script type="text/javascript">
         var content = new String(jQuery('#myCpWindow').val());
         content = content.replace(/{-%/g, '{' + '%');
         content = content.replace(/%-}/g, '%' + '}');
         jQuery('#myCpWindow').val(content);
      </script>
   </td>
</tr>
<tr>
   <td colspan="2">
      &nbsp;
   </td>
</tr>
<tr>
   <td colspan="2">
      <input type="submit" name="edit" value="Изменить" class="b" />
   </td>
</tr>
</table>
</form>
<script type="text/javascript">
jQuery('#update_form').submit(
   function() {
      jQuery('#text-content').val(myCpWindow.getCode());
   }
);
</script>
</div>
